﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Task/Task.master" AutoEventWireup="true"
    StylesheetTheme="Content" CodeFile="WorkTaskList.aspx.cs" Inherits="Task_WorkTask_WorkTaskList" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        function OpenUrl2(pp) {
            window.showModalDialog("Revert.aspx?id=" + pp + "&temp=" + Math.random(), 'newwindow', 'resizable:yes;scroll:yes;status:no;dialogWidth=800px;dialogHeight=400px;center=yes;help=no');
            window.location.reload();
        }
    </script>

    <ul class="topmenu">
        <li>年份：<asp:DropDownList ID="DptYear" Width="150px" runat="server">
        </asp:DropDownList>
            <asp:Label ID="lblMonth" runat="server" Text="月份："></asp:Label>
            <asp:DropDownList ID="DptMonth" Width="150px" runat="server">
            </asp:DropDownList>
            <asp:RadioButton ID="RdMonth" Text="按月份任务查询" runat="server" Checked="true" GroupName="Date"
                AutoPostBack="True" OnCheckedChanged="RdYear_CheckedChanged" />
            <asp:RadioButton ID="RdYear" Text="按年份任务查询" runat="server" GroupName="Date" AutoPostBack="True"
                OnCheckedChanged="RdYear_CheckedChanged" />
        </li>
        <li>
            <asp:LinkButton ID="BtnQuery" runat="server" OnClick="BtnQuery_Click">查 询</asp:LinkButton>
        </li>
<li><a href="TaskNew.aspx">添加任务</a> </li>
    </ul>
    <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="770px">
        <caption>
            <span>
                <asp:Label ID="lblTitle" runat="server"></asp:Label></span></caption>
        <tr>
            <td style="margin: 0; padding: 0">
                <asp:GridView ID="GvwList" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvwList_RowDataBound">
                    <Columns>
                        <asp:TemplateField ItemStyle-Width="30px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblID" runat="server"></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="工作任务">
                            <ItemTemplate>
                                <a href='WorkTaskView.aspx?ID=<%# Eval("ID") %>&P=0'>
                                    <%# GetSubString(Eval("WorkTask"),20)%></a>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemStyle Width="30%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="简要完成情况">
                            <ItemTemplate>
                                <%# GetSubString(Eval("SimpleCircs"), 20)%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Marking" HeaderText="分值"></asp:BoundField>
                        <asp:TemplateField HeaderText="自评分数">
                            <ItemTemplate>
                                <%# Eval("SelfScore").ToString().Equals("-1") ? "未评分" : Eval("SelfScore")%>
                            </ItemTemplate>
                            <ItemStyle ForeColor="Red" />
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                                <a href="TaskItems.aspx?id=<%# Eval("ID") %>">子任务</a> <a href='WorkTaskEdit.aspx?ID=<%# Eval("ID") %>&P=1'>
                                    自评</a> <a href='WorkTaskEdit.aspx?ID=<%# Eval("ID") %>'>修改</a>
                                <asp:LinkButton ID="BtnDelete" CommandArgument='<%# Eval("ID") %>' Text="删除" OnClientClick="return confirm('确定要删除此任务吗？')"
                                    runat="server" OnCommand="BtnDelete_Command"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle HorizontalAlign="Left" />
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
